package com.esd.crm.entity;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public class Orders {

	private String name;

	private String telephone;

	private Integer id;

	private String ordernumber;

	private Integer customerid;

	private String address;

	private String paymentstatus;

	private String freightstation;
	private String freightstationcard;
	private BigDecimal paid;
	private String paidStr;

	private BigDecimal payable;
	private String payableStr;

	private BigDecimal total;
	private String totalStr;

	private Integer number = 0;

	private String status;

	private Date createtime;

	private Integer createuser;

	private Date updatetime;

	private String orderCreateTime;

	private Integer updateuser;

	private Integer tax;
	private String remark;

	public Integer getTax() {
		return tax;
	}

	public void setTax(Integer tax) {
		this.tax = tax;
	}

	public String getPaidStr() {
		return paid.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
	}

	public void setPaidStr(String paidStr) {
		this.paidStr = paidStr;
	}

	public String getPayableStr() {
		return payable.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
	}

	public void setPayableStr(String payableStr) {
		this.payableStr = payableStr;
	}

	public String getTotalStr() {

		totalStr = total.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
		return totalStr;
	}

	public void setTotalStr(String totalStr) {
		this.totalStr = totalStr;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getOrderCreateTime() {
		if (createtime != null) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
			sdf.setTimeZone(TimeZone.getTimeZone("GMT+0"));
			String s = sdf.format(createtime);
			setOrderCreateTime(s);
			return orderCreateTime;
		} else {
			return null;
		}
	}

	public void setOrderCreateTime(String orderCreateTime) {
		this.orderCreateTime = orderCreateTime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getOrdernumber() {
		return ordernumber;
	}

	public void setOrdernumber(String ordernumber) {
		this.ordernumber = ordernumber == null ? null : ordernumber.trim();
	}

	public Integer getCustomerid() {
		return customerid;
	}

	public void setCustomerid(Integer customerid) {
		this.customerid = customerid;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address == null ? null : address.trim();
	}

	public String getPaymentstatus() {
		return paymentstatus;
	}

	public void setPaymentstatus(String paymentstatus) {
		this.paymentstatus = paymentstatus == null ? null : paymentstatus.trim();
	}

	public String getFreightstation() {
		return freightstation;
	}

	public void setFreightstation(String freightstation) {
		this.freightstation = freightstation == null ? null : freightstation.trim();
	}

	public BigDecimal getPaid() {
		return paid;
	}

	public void setPaid(BigDecimal paid) {
		this.paid = paid;
	}

	public BigDecimal getPayable() {
		return payable;
	}

	public void setPayable(BigDecimal payable) {
		this.payable = payable;
	}

	public BigDecimal getTotal() {
		return total;
	}

	public void setTotal(BigDecimal total) {
		this.total = total;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status == null ? null : status.trim();
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Integer getCreateuser() {
		return createuser;
	}

	public void setCreateuser(Integer createuser) {
		this.createuser = createuser;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	public Integer getUpdateuser() {
		return updateuser;
	}

	public void setUpdateuser(Integer updateuser) {
		this.updateuser = updateuser;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark == null ? null : remark.trim();
	}

	public String getFreightstationcard() {
		return freightstationcard;
	}

	public void setFreightstationcard(String freightstationcard) {
		this.freightstationcard = freightstationcard;
	}

	@Override
	public String toString() {
		return "Orders [name=" + name + ", telephone=" + telephone + ", id=" + id + ", ordernumber=" + ordernumber
				+ ", customerid=" + customerid + ", address=" + address + ", paymentstatus=" + paymentstatus
				+ ", freightstation=" + freightstation + ", freightstationcard=" + freightstationcard + ", paid=" + paid
				+ ", paidStr=" + paidStr + ", payable=" + payable + ", payableStr=" + payableStr + ", total=" + total
				+ ", totalStr=" + totalStr + ", number=" + number + ", status=" + status + ", createtime=" + createtime
				+ ", createuser=" + createuser + ", updatetime=" + updatetime + ", orderCreateTime=" + orderCreateTime
				+ ", updateuser=" + updateuser + ", remark=" + remark + "]";
	}

}